const { mapArrayAttributes } = require('../util')

Parse.Cloud.define('getQlVips', async (req, res) => {
  try {
    const result = await new Parse.Query('QlVip').ascending('monthes').find()
    res.success(mapArrayAttributes(result, ['monthes', 'money']))
  } catch (err) {
    console.log(err)
    res.error(err.message)
  }
})
